package com.test.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpSession;

@Controller
public class ConfirmController {

    @GetMapping("/confirm")
    public String showConfirmPage(Model model) {
        Long orgProvinceId = 430000L;
        model.addAttribute("orgProvinceId", orgProvinceId);
        return "confirm-page";
    }

    @PostMapping("/process")
    public String processRequest(@RequestParam String token, HttpSession session) {
            // 执行具体业务逻辑
            return "success";
    }

    @GetMapping("/cancel")
    public String cancelRequest() {
        return "cancel"; // 用户取消操作
    }
}
